package com.yilin.tms.order.mapper.rob;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yilin.tms.core.application.PageData;
import com.yilin.tms.core.entity.order.rob.RobOrder;
import com.yilin.tms.core.entity.user.account.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 抢单Mapper
 *
 * @author zhangjinyuan
 * @date 2022/10/29
 */
@Mapper
@Repository
public interface RobOrderMapper extends BaseMapper<RobOrder> {

    /**
     * 获取抢单分页
     */
    PageData<RobOrder> getRobOrderPage(@Param("page") PageData<RobOrder> page,
                                       @Param("loginUser") Account loginUser,
                                       @Param("query") RobOrder query,
                                       @Param("statuses") List<Integer> statuses);

    int getCancelNumberByUser(@Param("userId") String userId, @Param("start") String start, @Param("end") String end);

    List<RobOrder> getOrderListByCancelTime(@Param("date") String date);

}
